﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MyTest
{
    /// <summary>
    /// 教员:薛海
    /// 微信:xuehai03
    /// QQ:289477003
    /// 跑马灯
    /// 2019-2-20
    /// </summary>
    public partial class FrmMove : Form
    {
        public FrmMove()
        {
            InitializeComponent();
        }

        //时间控件
        private void timer1_Tick(object sender, EventArgs e)
        {
            this.label1.Text = "一个简单的跑马灯";
            if(this.label1.Left<-label1.Width)
            {
                this.label1.Left = this.panel1.Width;
            }
            this.label1.Left -= 17;
        }

        
        int index = 0;

        //时间控件
        private void timer2_Tick(object sender, EventArgs e)
        {
            if (index < this.imageList1.Images.Count - 1)
            {
                index++;
            }
            else
            {
                index = 0;
            }
            this.pictureBox1.Image=imageList1.Images[index];
        }


    }
}
